<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>联系我们</title>
    <script src="../js/jquery-3.1.1.min.js"></script>
    <script src="../js/common.js"></script>
    <link rel="stylesheet" href="../css/callus.css">
    <link rel="stylesheet" href="../css/common.css">
    <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=jLFpssLo0YfIOlyZdHUDirgYAAoy2P5f"></script>
</head>
<body>
<div id="top"></div>
<div class="middle">
    <div class="middle-title">联系我们</div>
    <div id="allmap" class="map">

    </div>
    <div>
        <div>
            <div>
                <div>品质至上,诚信为重，用心服务，以质量领先，我们真诚与您合作</div>
                <div> 竭诚为您服务!</div>
            </div>
            <div>Quality first, integrity oriented, hard service, leading technology, we sincerely cooperate with you,
                for your dedicated service!
            </div>
        </div>

    </div>
</div>
<div id="foot"></div>
</body>
</html>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");    // 创建Map实例
    var point = new BMap.Point(104.066271, 30.57903);
    map.centerAndZoom(point, 20);  // 初始化地图,设置中心点坐标和地图级别
    //添加地图类型控件
    map.addControl(new BMap.MapTypeControl({
        mapTypes: [
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]
    }));
    map.setCurrentCity("北京");          // 设置地图显示的城市 此项是必须设置的
    map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
    // 百度地图API功能
    var sContent = "<div class=\"page\">\n" +
        "    <div>1</div>\n" +
        "    <div>2</div>\n" +
        "    <div>3</div>\n" +
        "    <div>下一页</div>\n" +
        "    <div>尾页</div>\n" +
        "</div>";

    var marker = new BMap.Marker(point);
    var infoWindow = new BMap.InfoWindow(sContent);  // 创建信息窗口对象
    map.centerAndZoom(point, 15);
    map.addOverlay(marker);
    marker.addEventListener("click", function () {
        this.openInfoWindow(infoWindow);
        //图片加载完毕重绘infowindow
        document.getElementById('imgDemo').onload = function () {
            infoWindow.redraw();   //防止在网速较慢，图片未加载时，生成的信息框高度比图片的总高度小，导致图片部分被隐藏
        }
    });
</script>
